function [next_pos] = ForageQGSA(g, tar_pos, current_pos)
[N,D] = size(current_pos);

for d = 1:D
    S = rand();
    S = (S>=0.5)-(S<0.5); % S = (S>=0.5)*1+(S<0.5)*(-1)
    next_pos(1,d) = tar_pos(1,d) + S * g * abs(tar_pos(1,d) - current_pos(1,d)) * log(1/rand());
end

end